feat: implement comprehensive automated testing framework#21
Merged
robertocarlous merged 1 commit intoNeurowealth:mainfrom Mar 9, 2026
Merged
feat: implement comprehensive automated testing framework#21robertocarlous merged 1 commit intoNeurowealth:mainfrom
robertocarlous merged 1 commit intoNeurowealth:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: implement comprehensive automated testing framework
Closes #9
What was done
Built the full automated testing framework as specified in the issue,
covering all backend modules with no real external API calls in unit tests.
Test structure
tests/
├── unit/
│ ├── nlp/parser.test.ts
│ ├── nlp/responses.test.ts
│ ├── agent/scanner.test.ts
│ ├── agent/router.test.ts
│ ├── stellar/client.test.ts
│ ├── middleware/errorHandler.test.ts
│ └── whatsapp/
│ ├── handler.test.ts
│ └── userManager.test.ts
├── integration/
│ ├── api/auth.test.ts
│ ├── api/portfolio.test.ts
│ ├── api/transactions.test.ts
│ ├── api/deposit.test.ts
│ └── whatsapp/webhook.test.ts
└── helpers/
├── testDb.ts
└── factories.ts
Results
Changes
jest.config.ts— TypeScript Jest config with coverage thresholds andforceExitpackage.json— addedtestandtest:coveragescripts.github/workflows/ci.yml— runs tests + coverage on every PR, uploadscoverage artifact, fails build if thresholds not met
Backend/.gitignore— addedcoverage/exclusionsrc/controllers/auth-controller.ts/src/middleware/authenticate.ts—switched from
new PrismaClient()to the shareddbsingleton sojest.mock('../db')correctly intercepts all database calls in tests,preventing real Postgres connections during unit tests